package com.examination.api.instructor;

import com.examination.framework.model.response.QueryResponseResult;
import com.examination.system.administration.response.*;
import com.examination.system.instructor.student.ext.TbStudentEssential;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.concurrent.Callable;

/**
 * @author 寇淇芮
 * @Date 2019/10/15 18:21
 */
public interface  BeasControllerApi<T> {

    Callable<QueryResponseResult<T>> findList(  @RequestBody(required = false) T entity,
                                                @PathVariable("page") Integer page,
                                                @PathVariable("size") Integer size );

    Callable<T> findById(@PathVariable("id") String id);

    Callable<AddResult<T>> addDate(@RequestBody T entity);

    Callable<DeleteResult<T>> deleteById( @PathVariable("id") String id);

    Callable<DeleteResult<T>> deleteEntity(T entity);


    Callable<UpdateResult<T>> updateById(@RequestBody T entity,
                                         @PathVariable("id") String id);





}
